// src/routes/launches/launches.router.js
const express = require('express');

const {
    httpGetAllLaunches,
    httpAddNewLaunch,
    httpAbortLaunch,

} = require('./launches.controller');

// 创建 launchesRouter 路由器实例
const launchesRouter = express.Router();

// 为 launchesRouter 路由器实例添加 GET 请求处理⽅法
launchesRouter.get('/', httpGetAllLaunches);

//为launchesRouter路由器实例添加POST请求处理方法
launchesRouter.post('/', httpAddNewLaunch);
// 为 launchesRouter 路由器实例添加 DELETE 请求处理⽅法
launchesRouter.delete('/:id', httpAbortLaunch);


module.exports = launchesRouter;
